package com.baizhi.springboot.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Card {
    /*`id` int(11) NOT NULL AUTO_INCREMENT,
  `user` varchar(255) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `department` varchar(255) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `number` int(11) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `approver` varchar(255) DEFAULT NULL,*/
    private Integer id;
    private String user;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    private String department;
    private String position;
    private String phone;
    private String mobile;
    private Integer number;
    private String comment;
    private String approver;

    @Override
    public String toString() {
        return "Card{" +
                "id=" + id +
                ", user='" + user + '\'' +
                ", date=" + date +
                ", department='" + department + '\'' +
                ", position='" + position + '\'' +
                ", phone='" + phone + '\'' +
                ", mobile='" + mobile + '\'' +
                ", number=" + number +
                ", comment='" + comment + '\'' +
                ", approver='" + approver + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getApprover() {
        return approver;
    }

    public void setApprover(String approver) {
        this.approver = approver;
    }

    public Card(Integer id, String user, Date date, String department, String position, String phone, String mobile, Integer number, String comment, String approver) {
        this.id = id;
        this.user = user;
        this.date = date;
        this.department = department;
        this.position = position;
        this.phone = phone;
        this.mobile = mobile;
        this.number = number;
        this.comment = comment;
        this.approver = approver;
    }

    public Card() {
    }
}
